<template>
  <div class="right-container">
    <h3>Right 组件</h3>
    <hr>

    <!-- 声明一个插槽区域 -->
    <slot name="default"></slot>
    <hr>
    <slot name="bottom"></slot>
    <hr>
    <slot name="defaultContent">这是插槽的默认内容</slot>
    <hr>
    <slot name="content" msg="hello vue.js" :user="userifno"></slot>
  </div>
</template>

<script>
export default {
  data() {
    return {
      userifno: {
        name: 'zs',
        gender: '男'
      }
    }
  },
  created() {
    console.log('Right组件被创建');
  },
  activated() {
    console.log('Right组件被激活');
  },
  deactivated() {
    console.log('Right组价被缓存');
  },
}
</script>

<style lang="less">
.right-container {
  padding: 0 20px 20px;
  background-color: lightskyblue;
  min-height: 250px;
  flex: 1;
}
</style>
